#ifndef SWITCHBUTTOM_H
#define SWITCHBUTTOM_H

#include <QWidget>
#include <QPainter>
#include <QEvent>
#include <QPaintEvent>
#include <QMouseEvent>
#include <QString>

class switchbuttom:public QWidget
{
    Q_OBJECT
public:
    switchbuttom();
    void Getswitchbtnvalue(bool btn_status);
protected:
    void paintEvent(QPaintEvent *event) override;
    void mousePressEvent(QMouseEvent *event)override ;

signals:
    void clicked(bool ledstatus);
private:
    bool switchbtn=false;
    QBrush offbrush=Qt::gray;
    QBrush onbrush=Qt::green;

    QBrush offindicator=Qt::white;
    QBrush onindicator=Qt::white;
};

#endif // SWITCHBUTTOM_H
